﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace BuildRunner
{
	/// <summary>
	/// dlgCopy2.xaml の相互作用ロジック
	/// </summary>
	public partial class dlgCopy2 : Window
	{
		public dlgCopy2()
		{
			InitializeComponent();
		}

		private void TextBox_PreviewDragOver( object sender, DragEventArgs e )
		{
			e.Effects = e.Data.GetDataPresent( DataFormats.FileDrop ) ? DragDropEffects.All : DragDropEffects.None;
			e.Handled = true;
		}

		private void TextBox_Drop( object sender, DragEventArgs e )
		{
			if( e.Data.GetDataPresent( DataFormats.FileDrop ) ) {
				string[] docPath = (string[])e.Data.GetData( DataFormats.FileDrop );
				if( docPath.Length > 0 ) {
					( sender as TextBox ).Text = docPath[0];
				}
			}
		}
	}
}
